#include<stdio.h>

int main(void)
{
    int count;
    scanf("%d",&count);

    for (int i = 0; i < count; i++)
    {
        int tobekilled;
        int N;
        int sum = 2;
        scanf("%d",&N);
        if (N == 1)
        {
            sum = 1;
        }
        else if (N == 2)
        {
            sum = 2;
        }
        else
        {
            for (int j = 3; j < N+1; j++)
            { 
                tobekilled = sum/2;
                sum = sum*2;
                sum = sum - tobekilled;
            }
            
        }
        
        printf("%d\n",sum);

    }
    
}